﻿using System;

class Program
{
    static void Main()
    {
        int n = int.Parse(Console.ReadLine());
        if (n > 0 && n < 20)
        {
            for (int i = 1; i <= n; i++)
            {
                Console.Write(i + " ");
                for (int k = i + 1; k <= n + (i-1); k++)
                {
                    Console.Write(k + " ");
                }
                Console.WriteLine();
            }
        }
        else
        {
            Console.WriteLine("ERROR");
        }
    }
}